package com.jwork.progress.service.ordermqservice;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.UUID;

/**
 * Notes 订单业务
 * Author smiler
 * Date 2025/06/20 20:24
 */
@Service
@RequiredArgsConstructor
public class OrderService {
    private final OrderMQService orderMQService;

    /**
     * Notes 创建订单
     * Author smiler
     * Date 2025/06/20 20:24
     */
    public void createOrder() {
        // 1.创建订单逻辑...
        String orderId = UUID.randomUUID().toString();

        // 2.发送延迟消息（30min超时）
        orderMQService.sendDelayMsg(orderId, 16);

        // 3.其他业务逻辑

    }
}
